<?php
echo ord('a'), '<br>';
echo chr(97), '<br>';

echo mb_ord('中'), '<br>';
echo mb_chr(20013), '<br>';

$str = "hello java php";
echo md5('admin'), '<br>';
echo sha1('admin'), '<br>';

//获取字符串1 是否包含字符串2
echo str_contains('hellophp8', 'php'), '<br>';

echo str_pad("*", 10, "="), '<br>';
echo str_pad("*", 10, "=", STR_PAD_LEFT), '<br>';
echo str_pad("*", 10, "=", STR_PAD_BOTH), '<br>';

//str_ends_with()(string $haystack, string $needle): bool
//str_starts_with(string $haystack, string $needle): bool
echo str_starts_with("php8.3.1.jpg", "php"), "<br>";
echo str_ends_with("php8.3.1.jpg", "jpg"), "<br>";


